package com.itheima.web.interceptor;


import com.itheima.domain.db.Admin;

public class AdminHolder {
    private static ThreadLocal<Admin> local = new ThreadLocal<>();

    public static void set(Admin admin) {
        local.set(admin);
    }

    public static Long getId() {
        return local.get().getId();
    }

    public static Admin getAdmin() {
        return local.get();
    }

    public static void remove() {
        local.remove();
    }

}
